package com.qd.common.sys.domain.entity.login;

import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size;


/**
 * @author sjk
 */
@Getter
@Setter
@Accessors(chain = true)
public class LoginUserOrgDTO {

    /**
     * 主键
     */
    @Size(max = 50, message = "中间ID长度不能超过{max}位")
    private String id;
    /**
     * 登录方式
     */
    @Size(max = 50, message = "登录方式长度不能超过{max}位")
    private String remote;
    /**
     * 机构ID
     */
    @NotBlank(message = "机构ID不能为空")
    @Size(max = 50, message = "机构ID长度不能超过{max}位")
    private String orgId;
    /**
     * 人员ID
     */
    @Size(max = 50, message = "人员ID长度不能超过{max}位")
    private String personId;

    public void freeData() {
        this.id = null;
        this.remote = null;
        this.orgId = null;
        this.personId = null;
    }
}
